#include "Cbook.h"

Spbook::Spbook(): Cbook("noname", true), copy_cnt(0){}

Spbook::Spbook(const Spbook& pt): Cbook(pt.name, pt.state), copy_cnt(0){}

Spbook::Spbook(std::string pt): Cbook(pt, true), copy_cnt(0){}

int Spbook::get_type_book()const { return Type_Spbook; }

bool Spbook::change()
{
	state = !state;
	return true;
}

bool Spbook::copy()
{
	if(state)
	{
		copy_cnt++;
		return true;
	}
	return false;
}

int Spbook::get_copy_cnt()const
{
	return copy_cnt;
}
